package com.explorati.design_pattern.behavior.chainofresponsibility;

public class Test {
	public static void main(String[] args) {
		Approver articleApprover = new ArticleApprover();
		Approver videoApprover = new VideoApprover();
		Approver qaApprover = new QAApprover();

		Course course = new Course();
		course.setName("Java设计模式精讲");
		course.setArticle("Java设计模式精讲的手记");
		course.setVideo("Java设计模式精讲的视频");
		course.setQA("Java设计模式问答");

		// 本例中需手动设置下一个审批者
		articleApprover.setNextApprover(videoApprover);
		videoApprover.setNextApprover(qaApprover);
		articleApprover.deploy(course);
	}

}
